consume = int(input())
if consume<=150:
    consume *= 0.4463
elif  150<consume<=400:
    consume = 66.945 + (consume - 150) * 0.4663
else:
    consume = 183.52 + (consume - 400) * 0.5663
print("%.1f"%consume)